home *** CD-ROM | disk | FTP | other *** search
/ MacWarehouse Macintosh Games / MacWarehouse Macintosh Games.iso / AMBER demo / ROXY / ROXY.dxr / 00468.ls < prev    next >
Encoding:
Text File  |  1996-10-18  |  10.0 KB  |  286 lines

  1. on usePeekUnit
  2.   global oStoryteller, oPuppeteer, gPeekPlayList, gScanFinish, gOriginPoint, gCPU
  3.   setState(oStoryteller, #playerHasPeekUnit, #inUse)
  4.   killVideo()
  5.   updateStage()
  6.   idle()
  7.   cursorOff()
  8.   set peekBody to 38
  9.   set peekAntenna to 46
  10.   set peekRollUp to 44
  11.   set peekText to 40
  12.   set pkScanIcon to 41
  13.   set pkBarIcon to 42
  14.   set pkAmberIcon to 43
  15.   set buttonCoords to point(247, 270) + gOriginPoint
  16.   set textList to getProp(the lsMultiFrames of oPuppeteer, #peekText)
  17.   puppetSprite(peekBody, 1)
  18.   set the stretch of sprite peekBody to 0
  19.   set the ink of sprite peekBody to 8
  20.   set the castNum of sprite peekBody to getProp(the lsForegroundData of oPuppeteer, #PeekDown)
  21.   set the loc of sprite peekBody to point(320, 200) + gOriginPoint
  22.   puppetSprite(peekAntenna, 1)
  23.   set the stretch of sprite peekAntenna to 0
  24.   set the ink of sprite peekAntenna to 36
  25.   set the castNum of sprite peekAntenna to getProp(the lsForegroundData of oPuppeteer, #peekAntenna)
  26.   set the loc of sprite peekAntenna to point(320, 200) + gOriginPoint
  27.   set peekAnim to getProp(the lsForegroundData of oPuppeteer, #PeekUpAnim)
  28.   set peekVideo to getProp(the lsForegroundData of oPuppeteer, #PkVideoNormal)
  29.   puppetSprite(peekRollUp, 1)
  30.   set the movieRate of sprite peekRollUp to 0
  31.   set the movieTime of sprite peekRollUp to 0
  32.   set the loc of sprite peekRollUp to point(317, 189) + gOriginPoint
  33.   set the castNum of sprite peekRollUp to peekAnim
  34.   setTransition(oPuppeteer, #fadeIn)
  35.   set the inventoryStatus of oPuppeteer to #cool
  36.   updateDisplay(oPuppeteer)
  37.   if gCPU = #PC then
  38.     suspendSounds(#fadeOut)
  39.   end if
  40.   set the movieRate of sprite peekRollUp to 1
  41.   repeat while the movieTime of sprite peekRollUp < the duration of cast peekAnim
  42.     updateStage()
  43.   end repeat
  44.   set the castNum of sprite peekBody to getProp(the lsForegroundData of oPuppeteer, #PeekUp)
  45.   set camSprite to peekRollUp
  46.   set the loc of sprite camSprite to point(317, 132) + gOriginPoint
  47.   set the castNum of sprite camSprite to getProp(peekVideo, #PkNone)
  48.   puppetSprite(peekText, 1)
  49.   set the stretch of sprite peekText to 0
  50.   set the castNum of sprite peekText to getProp(textList, #none)
  51.   set the loc of sprite peekText to point(317, 226) + gOriginPoint
  52.   puppetSprite(pkScanIcon, 1)
  53.   set the stretch of sprite pkScanIcon to 0
  54.   set the loc of sprite pkScanIcon to buttonCoords
  55.   set currentStatus to getState(oStoryteller, #PKscanStatus)
  56.   if (currentStatus <> #Offline) and (currentStatus <> #CantAttach) then
  57.     set the castNum of sprite pkScanIcon to getAt(getProp(the lsMultiFrames of oPuppeteer, #scanIcon), 3)
  58.   else
  59.     set the castNum of sprite pkScanIcon to getAt(getProp(the lsMultiFrames of oPuppeteer, #scanIcon), 2)
  60.   end if
  61.   puppetSprite(pkBarIcon, 1)
  62.   set the stretch of sprite pkBarIcon to 0
  63.   set the loc of sprite pkBarIcon to buttonCoords
  64.   if getState(oStoryteller, #BarOnline) = 1 then
  65.     set the castNum of sprite pkBarIcon to getAt(getProp(the lsMultiFrames of oPuppeteer, #barIcon), 3)
  66.     buildDefaultPlaylist()
  67.   else
  68.     set the castNum of sprite pkBarIcon to getAt(getProp(the lsMultiFrames of oPuppeteer, #barIcon), 2)
  69.   end if
  70.   puppetSprite(pkAmberIcon, 1)
  71.   set the stretch of sprite pkAmberIcon to 0
  72.   set the loc of sprite pkAmberIcon to buttonCoords
  73.   if getState(oStoryteller, #AMBERisOnline) = 1 then
  74.     set the castNum of sprite pkAmberIcon to getAt(getProp(the lsMultiFrames of oPuppeteer, #amberIcon), 3)
  75.   else
  76.     set the castNum of sprite pkAmberIcon to getAt(getProp(the lsMultiFrames of oPuppeteer, #amberIcon), 2)
  77.   end if
  78.   set hotStuff to getState(oStoryteller, #PeekDisplay)
  79.   setState(oStoryteller, #PeekDisplay, #none)
  80.   if hotStuff = #barStatus then
  81.     if getState(oStoryteller, #BarOnline) then
  82.       mouseDown(script "bar icon --")
  83.     else
  84.       mouseDown(script "scan icon --")
  85.     end if
  86.   end if
  87.   if hotStuff = #scanStatus then
  88.     mouseDown(script "scan icon --")
  89.   end if
  90.   if hotStuff = #amberStatus then
  91.     mouseDown(script "amber icon --")
  92.   end if
  93.   if hotStuff = #psionicFragment then
  94.     hideCursor()
  95.     resetPeeKdisplay()
  96.     set peekVideo to getProp(the lsForegroundData of oPuppeteer, #PkVideoNormal)
  97.     set the castNum of sprite camSprite to getProp(peekVideo, #PkFragment)
  98.     set the movieTime of sprite camSprite to 0
  99.     pushVideo()
  100.     wait(#videoStop)
  101.     if getState(oStoryteller, #houseLightsAreOn) = 1 then
  102.       set the castNum of sprite peekText to getProp(textList, #fragmentCollected)
  103.     else
  104.       set the castNum of sprite peekText to getProp(textList, #psionicFragment)
  105.     end if
  106.     updateStage()
  107.   end if
  108.   if hotStuff = #ghostKnife then
  109.     hideCursor()
  110.     set gPeekPlayList to [#PkFadeIn, #PkKitchenGhost, #PkFadeOut]
  111.     setState(oStoryteller, #PKbarStatus, #activityDetected)
  112.     trimState(#cameraFeedbackRemaining, #ghostKnife)
  113.     mouseDown(script "bar icon --")
  114.   end if
  115.   if hotStuff = #ghostlyKey then
  116.     hideCursor()
  117.     set gPeekPlayList to [#PkFadeIn, #PkBedroomGhost, #PkFadeOut]
  118.     setState(oStoryteller, #PKbarStatus, #activityDetected)
  119.     trimState(#cameraFeedbackRemaining, #ghostlyKey)
  120.     mouseDown(script "bar icon --")
  121.   end if
  122.   if hotStuff = #crazyLR then
  123.     hideCursor()
  124.     set gPeekPlayList to [#PkFadeIn, #PkCrazyLR, #PkFadeOut]
  125.     setState(oStoryteller, #PKbarStatus, #activityDetected)
  126.     trimState(#cameraFeedbackRemaining, #crazyLR)
  127.     mouseDown(script "bar icon --")
  128.   end if
  129.   if hotStuff = #crazyDR then
  130.     hideCursor()
  131.     set gPeekPlayList to [#PkFadeIn, #PkCrazyDR, #PkFadeOut]
  132.     setState(oStoryteller, #PKbarStatus, #activityDetected)
  133.     trimState(#cameraFeedbackRemaining, #crazyDR)
  134.     mouseDown(script "bar icon --")
  135.   end if
  136.   if hotStuff = #KdKnob then
  137.     hideCursor()
  138.     set gPeekPlayList to [#PkFadeIn, #PkKdKnob, #PkFadeOut]
  139.     setState(oStoryteller, #PKbarStatus, #activityDetected)
  140.     trimState(#cameraFeedbackRemaining, #KdKnob)
  141.     mouseDown(script "bar icon --")
  142.   end if
  143.   if hotStuff = #bloodBath then
  144.     hideCursor()
  145.     set gPeekPlayList to [#PkFadeIn, #PkBloodBath, #PkFadeOut]
  146.     setState(oStoryteller, #PKbarStatus, #activityDetected)
  147.     trimState(#cameraFeedbackRemaining, #bloodBath)
  148.     mouseDown(script "bar icon --")
  149.   end if
  150.   if hotStuff = #BARstartup then
  151.     set gPeekPlayList to [#PkNone]
  152.     setState(oStoryteller, #PKbarStatus, #Online)
  153.     mouseDown(script "bar icon --")
  154.     buildDefaultPlaylist()
  155.     wait(90)
  156.     setState(oStoryteller, #PKbarStatus, #noActivity)
  157.     idle()
  158.     mouseDown(script "bar icon --")
  159.   end if
  160.   if hotStuff = #amberStartup then
  161.     hideCursor()
  162.     setState(oStoryteller, #PKamberStatus, #ModulatingEEG)
  163.     mouseDown(script "amber icon --")
  164.     updateStage()
  165.     wait(240)
  166.     set the castNum of sprite peekText to getProp(textList, #none)
  167.     updateStage()
  168.     wait(20)
  169.     setState(oStoryteller, #PKamberStatus, #oneMoment)
  170.     updateStage()
  171.     wait(200)
  172.     set the castNum of sprite peekText to getProp(textList, #none)
  173.     updateStage()
  174.     wait(20)
  175.     setState(oStoryteller, #PKamberStatus, #surfsUp)
  176.     updateStage()
  177.     wait(50)
  178.     set the castNum of sprite peekText to getProp(textList, #none)
  179.     updateStage()
  180.     wait(20)
  181.     setState(oStoryteller, #PKamberStatus, #surfsUp)
  182.     updateStage()
  183.     wait(50)
  184.     set the castNum of sprite peekText to getProp(textList, #none)
  185.     updateStage()
  186.     wait(20)
  187.     setState(oStoryteller, #PKamberStatus, #surfsUp)
  188.     updateStage()
  189.   end if
  190.   if hotStuff = #irregularSurface then
  191.     hideCursor()
  192.     setState(oStoryteller, #PKscanStatus, #CantAttach)
  193.     mouseDown(script "scan icon --")
  194.     updateStage()
  195.     wait(120)
  196.     setState(oStoryteller, #PKscanStatus, #Offline)
  197.     mouseDown(script "scan icon --")
  198.   end if
  199.   if hotStuff = #badScan then
  200.     hideCursor()
  201.     if getState(oStoryteller, #DoorWithScanUnit) = #none then
  202.       set currentState to #Offline
  203.     else
  204.       set currentState to #Online
  205.     end if
  206.     setState(oStoryteller, #PKscanStatus, #NoResidue)
  207.     mouseDown(script "scan icon --")
  208.     updateStage()
  209.     wait(170)
  210.     setState(oStoryteller, #PKscanStatus, currentState)
  211.   end if
  212.   if hotStuff = #interruptedScan then
  213.     hideCursor()
  214.     if getState(oStoryteller, #DoorWithScanUnit) = #none then
  215.       set currentState to #Offline
  216.     else
  217.       set currentState to #Online
  218.     end if
  219.     setState(oStoryteller, #PKscanStatus, #Interrupted)
  220.     mouseDown(script "scan icon --")
  221.     updateStage()
  222.     wait(110)
  223.     setState(oStoryteller, #PKscanStatus, currentState)
  224.   end if
  225.   if hotStuff = #goodScan1min then
  226.     hideCursor()
  227.     set finishTime to gScanFinish
  228.     setState(oStoryteller, #PKscanStatus, #Preamble)
  229.     mouseDown(script "scan icon --")
  230.     updateStage()
  231.     wait(70)
  232.     idle()
  233.     setState(oStoryteller, #PKscanStatus, #Wait1min)
  234.     set gScanFinish to finishTime
  235.     mouseDown(script "scan icon --")
  236.   end if
  237.   if hotStuff = #goodScan2min then
  238.     hideCursor()
  239.     set finishTime to gScanFinish
  240.     setState(oStoryteller, #PKscanStatus, #Preamble)
  241.     mouseDown(script "scan icon --")
  242.     updateStage()
  243.     wait(70)
  244.     idle()
  245.     setState(oStoryteller, #PKscanStatus, #Wait2min)
  246.     set gScanFinish to finishTime
  247.     mouseDown(script "scan icon --")
  248.   end if
  249.   if hotStuff = #goodScan3min then
  250.     hideCursor()
  251.     set finishTime to gScanFinish
  252.     setState(oStoryteller, #PKscanStatus, #Preamble)
  253.     mouseDown(script "scan icon --")
  254.     updateStage()
  255.     wait(70)
  256.     idle()
  257.     setState(oStoryteller, #PKscanStatus, #Wait3min)
  258.     set gScanFinish to finishTime
  259.     mouseDown(script "scan icon --")
  260.   end if
  261.   if hotStuff = #goodScan4min then
  262.     hideCursor()
  263.     set finishTime to gScanFinish
  264.     setState(oStoryteller, #PKscanStatus, #Preamble)
  265.     mouseDown(script "scan icon --")
  266.     updateStage()
  267.     wait(70)
  268.     idle()
  269.     setState(oStoryteller, #PKscanStatus, #Wait4min)
  270.     set gScanFinish to finishTime
  271.     mouseDown(script "scan icon --")
  272.   end if
  273.   if hotStuff = #goodScan5min then
  274.     hideCursor()
  275.     set finishTime to gScanFinish
  276.     setState(oStoryteller, #PKscanStatus, #Preamble)
  277.     mouseDown(script "scan icon --")
  278.     updateStage()
  279.     wait(70)
  280.     idle()
  281.     setState(oStoryteller, #PKscanStatus, #Wait5min)
  282.     set gScanFinish to finishTime
  283.     mouseDown(script "scan icon --")
  284.   end if
  285. end
  286.